﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 委托
{
    class Program
    {
        static void Main(string[] args)
        {
            You you = new You(100);
            Me me = new Me();

            //you.md = new MoodDelegate(me.Joking);//注册
            //you.md += new MoodDelegate(me.Shopping);
            //you.md += new MoodDelegate(me.Gaming);
            //you.md += new MoodDelegate(me.Eating);

            //you.md = new MoodDelegate(me.Joking)
            //    + new MoodDelegate(me.Shopping)
            //    + new MoodDelegate(me.Gaming)
            //    + new MoodDelegate(me.Eating);

            //you.md = me.Joking;//注册
            //you.md += me.Shopping;
            //you.md += me.Gaming;
            //you.md += me.Eating;

            you.md += me.Joking;//注册
            you.md += me.Shopping;
            you.md += me.Gaming;
            you.md += me.Eating;

            you.meetDif();

            Console.ReadLine();
        }
    }
}
